From e11f023a3d810641aebc1a6349ad7183b42a8949 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 23 Dec 2021 06:34:29 +0100 Subject: [PATCH] - updated detach,configure patches - removed obsolete gcc4,stop_polling patches - partially updated files --- TiMidity++-configure.patch | 10 +++++----- TiMidity++-detach.patch | 37 +++++++++++++++++------------------ TiMidity++-gcc4.patch | 15 -------------- TiMidity++-stop_polling.patch | 34 -------------------------------- TiMidity++.spec | 23 +++++----------------- 5 files changed, 28 insertions(+), 91 deletions(-) delete mode 100644 TiMidity++-gcc4.patch delete mode 100644 TiMidity++-stop_polling.patch diff --git a/TiMidity++-configure.patch b/TiMidity++-configure.patch index 3004f7c..6580746 100644 --- a/TiMidity++-configure.patch +++ b/TiMidity++-configure.patch @@ -1,6 +1,6 @@ ---- configure.in 2004-10-03 14:39:52.000000000 +0200 -+++ configure.in.new 2007-11-12 12:40:35.000000000 +0100 -@@ -137,7 +137,7 @@ +--- TiMidity++-2.15.0/configure.in.orig 2021-12-22 21:46:56.871872445 +0100 ++++ TiMidity++-2.15.0/configure.in 2021-12-22 21:47:00.128521469 +0100 +@@ -138,7 +138,7 @@ AC_ARG_WITH(default-path, pkgdatadir='/usr/local/share/timidity' fi ]) @@ -9,7 +9,7 @@ AC_DEFINE_UNQUOTED(DEFAULT_PATH,"$tmpdefpath",place to install patches) AC_DEFINE(PKGDATADIR,DEFAULT_PATH,a compatibility matter. ignore it.) -@@ -151,7 +151,7 @@ +@@ -152,7 +152,7 @@ AC_ARG_WITH(module-dir, pkglibdir='/usr/local/lib/timidity' fi ]) @@ -17,4 +17,4 @@ +tmplibdir="`eval echo ${pkglibdir}`" AC_DEFINE_UNQUOTED(PKGLIBDIR,"$tmplibdir",place to install modules) - + AC_ARG_WITH(xaw-resource-prefix, diff --git a/TiMidity++-detach.patch b/TiMidity++-detach.patch index a4dda6a..d1646e5 100644 --- a/TiMidity++-detach.patch +++ b/TiMidity++-detach.patch @@ -1,23 +1,22 @@ -diff -dur TiMidity++-2.13.0.orig/interface/alsaseq_c.c TiMidity++-2.13.0/interface/alsaseq_c.c ---- TiMidity++-2.13.0.orig/interface/alsaseq_c.c 2004-03-04 05:11:50.000000000 +0100 -+++ TiMidity++-2.13.0/interface/alsaseq_c.c 2004-09-15 18:42:41.549524231 +0200 -@@ -402,7 +402,11 @@ - if (ctl.flags & CTLF_DAEMONIZE) +--- TiMidity++-2.15.0/timidity/timidity.c.orig 2018-08-29 01:33:39.000000000 +0200 ++++ TiMidity++-2.15.0/timidity/timidity.c 2021-12-22 21:44:01.522822393 +0100 +@@ -5587,7 +5587,11 @@ MAIN_INTERFACE int timidity_post_load_co + if (ctl->id_character == 'A' && (ctl->flags & CTLF_DAEMONIZE)) + { + int pid = fork(); ++ int fd; + FILE *pidf; ++ for(fd=0;fd<256;fd++) ++ if (isatty(fd)) ++ close(fd); + switch (pid) { - int pid = fork(); -+ int fd; - FILE *pidf; -+ for(fd=0;fd<256;fd++){ -+ if (isatty(fd)) close(fd); -+ } - switch (pid) - { - case 0: // child is the daemon -@@ -414,6 +418,7 @@ - fprintf( pidf, "%d\n", pid ); - exit(0); + case 0: // child is the daemon +@@ -5602,6 +5606,7 @@ MAIN_INTERFACE int timidity_post_load_co } -+ setsid(); + exit(0); } ++ setsid(); + } + #endif - for (;;) { diff --git a/TiMidity++-gcc4.patch b/TiMidity++-gcc4.patch deleted file mode 100644 index a70a459..0000000 --- a/TiMidity++-gcc4.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -uNr TiMidity++-2.13.0.orig/interface/xaw_i.c TiMidity++-2.13.0/interface/xaw_i.c ---- TiMidity++-2.13.0.orig/interface/xaw_i.c 2003-09-02 13:11:36.000000000 +0200 -+++ TiMidity++-2.13.0/interface/xaw_i.c 2005-05-18 11:48:42.000000000 +0200 -@@ -261,7 +261,10 @@ - String bitmapdir = XAW_BITMAP_DIR; - Boolean arrangetitle,savelist; - static char **current_flist = NULL; --static int voices = 0, last_voice = 0, voices_num_width; -+#ifndef ___PLAYMIDI_H_ -+static int voices = 0; -+#endif /* ___PLAYMIDI_H_ */ -+static int last_voice = 0, voices_num_width; - static int maxentry_on_a_menu = 0,submenu_n = 0; - #define OPTIONS_WINDOW 1 - #define FLIST_WINDOW 2 diff --git a/TiMidity++-stop_polling.patch b/TiMidity++-stop_polling.patch deleted file mode 100644 index 35c2b66..0000000 --- a/TiMidity++-stop_polling.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- TiMidity++-2.13.2/interface/alsaseq_c.c.orig 2010-12-16 13:26:54.000000000 +0100 -+++ TiMidity++-2.13.2/interface/alsaseq_c.c 2010-12-16 14:15:24.486618509 +0100 -@@ -505,6 +505,8 @@ - - static void doit(struct seq_context *ctxp) - { -+ fd_set rfds; -+ struct timeval timeout; - for (;;) { - while (snd_seq_event_input_pending(ctxp->handle, 1)) { - if (do_sequencer(ctxp)) -@@ -532,15 +534,17 @@ - play_event(&ev); - aq_fill_nonblocking(); - } -- if (! ctxp->active || ! IS_STREAM_TRACE) { -- fd_set rfds; -- struct timeval timeout; -- FD_ZERO(&rfds); -- FD_SET(ctxp->fd, &rfds); -+ -+ FD_ZERO(&rfds); -+ FD_SET(ctxp->fd, &rfds); -+ if (ctxp->active) { - timeout.tv_sec = 0; - timeout.tv_usec = 10000; /* 10ms */ - if (select(ctxp->fd + 1, &rfds, NULL, NULL, &timeout) < 0) - goto __done; -+ } else { -+ if (select(ctxp->fd + 1, &rfds, NULL, NULL, NULL) < 0) -+ goto __done; - } - } - diff --git a/TiMidity++.spec b/TiMidity++.spec index 5798fcd..5666073 100644 --- a/TiMidity++.spec +++ b/TiMidity++.spec @@ -33,9 +33,7 @@ Source6: timidity.sysconfig Source7: timidity-modules-load.conf Source8: timidity.service Patch0: %{name}-detach.patch -Patch1: %{name}-gcc4.patch Patch2: %{name}-configure.patch -Patch3: %{name}-stop_polling.patch URL: http://timidity.sourceforge.net/ %{?with_alsa:BuildRequires: alsa-lib-devel} %{?with_arts:BuildRequires: arts-devel} @@ -237,13 +235,11 @@ jako silnik syntezatora MIDI w architekturze ALSA. %prep %setup -q -#%%patch0 -p1 -#%%patch1 -p1 -#%%patch2 -p0 -#%%patch3 -p1 +%patch0 -p1 +%patch2 -p1 for f in doc/ja_JP.eucJP/README*; do - mv -f $f ${f}.ja + %{__mv} $f ${f}.ja done %build @@ -302,7 +298,7 @@ install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir} cd $RPM_BUILD_ROOT%{_datadir}/GUSpatches tar xzf %{SOURCE1} -mv -f instruments/* . +%{__mv} instruments/* . rmdir instruments bzip2 -cd %{SOURCE2} > britepno.pat bzip2 -cd %{SOURCE3} > pistol.pat @@ -343,8 +339,6 @@ fi %dir %{_libdir}/timidity %attr(755,root,root) %{_libdir}/timidity/if_emacs.so %attr(755,root,root) %{_libdir}/timidity/if_ncurses.so -#%{_libdir}/timidity/interface_e.txt -#%{_libdir}/timidity/interface_n.txt %if "%{_lib}" != "lib" %dir %{_prefix}/lib/timidity %endif @@ -367,7 +361,6 @@ fi %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/gtkmidi %attr(755,root,root) %{_libdir}/timidity/if_gtk.so -#%{_libdir}/timidity/interface_g.txt %endif %if %{with x} @@ -375,13 +368,11 @@ fi %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/xmmidi %attr(755,root,root) %{_libdir}/timidity/if_motif.so -#%{_libdir}/timidity/interface_m.txt %endif %files slang %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/timidity/if_slang.so -#%{_libdir}/timidity/interface_s.txt %if %{with x} %files tcltk @@ -390,7 +381,6 @@ fi %lang(ja) %doc doc/ja_JP.eucJP/README.tk.ja %attr(755,root,root) %{_bindir}/tkmidi %attr(755,root,root) %{_libdir}/timidity/if_tcltk.so -#%{_libdir}/timidity/interface_k.txt %{_prefix}/lib/timidity/tclIndex %{_prefix}/lib/timidity/*.tcl %endif @@ -398,7 +388,6 @@ fi %files vt100 %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/timidity/if_vt100.so -#%{_libdir}/timidity/interface_T.txt %if %{with x} %files xaw @@ -406,8 +395,7 @@ fi %doc doc/C/README.xaw %lang(ja) %doc doc/ja_JP.eucJP/README.xaw.ja %attr(755,root,root) %{_bindir}/xawmidi -#%attr(755,root,root) %{_libdir}/timidity/interface_a.so -#%{_libdir}/timidity/interface_a.txt +%attr(755,root,root) %{_libdir}/timidity/if_xaw.so %files xskin %defattr(644,root,root,755) @@ -415,7 +403,6 @@ fi %lang(ja) %doc doc/ja_JP.eucJP/README.xskin.ja %attr(755,root,root) %{_bindir}/xskinmidi %attr(755,root,root) %{_libdir}/timidity/if_xskin.so -#%{_libdir}/timidity/interface_i.txt %endif %if %{with alsa} -- 2.44.0